#include <cstdio>
#include <cstdlib>


int *divmod(int m, int n) {
    int *result = (int *) malloc(sizeof(int) * 2);
    result[0] = m / n;
    result[1] = m - result[0] * n;
    return result;
}

int main() {
    float n;
    /* 输入剩余金额 */
    scanf("%f", &n);
    /* 计数的索引 */
    int index = 0;
    /* 人民币数组 */
    int data[] = {100, 50, 20, 10, 5, 2, 1};
    /* 与人民币对应的数量数组 */
    int count[] = {0, 0, 0, 0, 0, 0, 0};
    // 剩余金额不为0则继续循环
    while (n != 0) {
        // 需要金额张数
        int *result = divmod(n, data[index]);
        // 计数器数组根据索引累加
        count[index] = result[0];
        //剩余金额
        n = result[1];
        index++;
    }
    for (int i = 0; i < 7; i++) {
        printf("%d %d\n", data[i], count[i]);
    }
    /*int a = 0;//小数的索引
    float b[]={0.50,0.25,0.10,0.05,0.01};
    int c[]= {0,0,0,0,0,};
    while ( n!=0){
        int *result = divmod(n,b[a]);
        c[index] = result[0];
        n = result[1];
        a++;
    }
    for (int j = 0; j < 5; j++) {
        printf("%f %d\n",b[j], c[j]);
    }*/
    return 0;
}